package com.swang.redis.service.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @ClassName:RedisSigleService
 * @Description:单实例redis操作
 * @date:2017年03月10 10:50
 */
@Service("redisSigleService")
public class RedisSingleServiceImpl extends RedisBaseOperate {

    private final static Logger LOGGER = LoggerFactory.getLogger(RedisSingleServiceImpl.class);

    @Autowired
    @Qualifier("stringRedisTemplate")
    private StringRedisTemplate stringSigleRedisTemplate;

    @Override
    protected void printLog(String key) {
        LOGGER.info("单实例redis调用 key:" + key);
    }

    @Override
    public StringRedisTemplate getStringRedisTemplate() {
        return stringSigleRedisTemplate;
    }

}
